﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;

namespace Lawyer.Web.Admin
{
    public partial class admin_activitytypeadd : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnSubmit_Click(object sender, EventArgs e)
        {

            string strErr = "";

            string TypeName = this.txtType.Text;

            Lawyer.Model.ActivityTypeInfo model = new Lawyer.Model.ActivityTypeInfo();
            model.TypeID = Guid.NewGuid().ToString();
            model.TypeName = TypeName;

            Lawyer.BLL.ActivityTypeInfo bll = new Lawyer.BLL.ActivityTypeInfo();
            bll.Add(model);
            string js = 
                @"if(confirm('Add success!')){
                    parent.location.reload();
                }";
            ScriptManager.RegisterStartupScript(this,this.GetType(),"Submit",js,true);

        }


        public void btnCancle_Click(object sender, EventArgs e)
        {
            Response.Write(" <script>window.opener=null;self.close()</script> ");


        }


        
    }
}
